package test_pack;

import static org.junit.Assert.*;

import org.junit.Test;

import Proj_pack.netz2135;

public class netzTest {
	private int often=100;
	private int erwarteterWert;
	@Test
	public void testMain() {
//		String[] s = new String[]{"..\\testsuite\\milliongraph_1.xml"}; erwarteterWert=1;
//		String[] s= 	new String[]{"..\\testsuite\\multiple\\graph03_a.xml","..\\testsuite\\multiple\\graph03_b.xml","..\\testsuite\\multiple\\graph03_c.xml"}; erwarteterWert= 7;
//		String[] s= 	new String[]{"..\\testsuite\\multiple\\graph02_a.xml","..\\testsuite\\multiple\\graph02_b.xml"}; erwarteterWert= 3;
//		String[] s = new String[]{"..\\testsuite\\spice\\graph04.xml"}; erwarteterWert=3; 
//		String[] s = new String[]{"..\\testsuite\\speed\\graph17.xml"}; erwarteterWert= 53;
		String[] s = new String[]{"..\\testsuite\\speed\\graph01.xml"}; erwarteterWert= 7;
//		String[] s = new String[]{"..\\testsuite\\speed\\graph18.xml"}; erwarteterWert=  72;
//		String[] s = new String[]{"/home/govinda/uni/NP/projekt/testsuite/speed/graph18.xml"}; // 72
//				String[] s = new String[]{"/home/govinda/uni/NP/projekt/testsuite/speed/graph00.xml"}; // 8
//				String[] s = new String[]{"/home/govinda/uni/NP/projekt/testsuite/crack/germany.xml", "5"}; // 666
//		String[] s = new String[]{"..\\testsuite\\crack\\germany.xml", "5"};

		tryIt(s);
		System.out.println("test complete");
	}


	public void tryIt(String[] s){
		for(int i =0; i<often; i++){	
			Proj_pack.netz2135 netz = new netz2135();
			netz.main(s);
			System.out.println("Versuch: "+(i+1));
			assertEquals( erwarteterWert , netz.getRes());
			
		}
	}
}